package com.joysuch.wwyt.common.controller;

import com.joysuch.wwyt.common.service.PersonalizeDesignService;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 首页个性化设置
 *
 * @Author ZhangDong
 * @Date 2020/6/11 16:40
 */
@RestController
@RequestMapping("/common/personalize")
@Api(tags = "/common/personalize 首页个性化设置")
public class PersonalizeDesignController {

    @Autowired
    private PersonalizeDesignService personalizeDesignService;

    //首页菜单
    @PostMapping("personal-menu-save")
    @ApiOperation("个人菜单保存-入参:菜单ids")
    public ResultBean personalMenuSave(@RequestBody List<Long> menuIds) {
        return personalizeDesignService.personalMenuSave(menuIds);
    }

    @GetMapping("personal-menu-list")
    @ApiOperation("个人菜单查询")
    public ResultBean personalMenuList(){
        return personalizeDesignService.personalMenuList();
    }

}
